package Operate;

import BookList.Book;
import BookList.Booklist;

import java.util.Scanner;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-25
 * Time:10:08
 */
public class Addoperate implements IO {
    @Override
    public void work(Booklist book) {
        System.out.println("增加的图书信息：书名 作者 类型  价格");
        Scanner sc=new Scanner(System.in);
        String name=sc.nextLine();
        String author=sc.nextLine();
        String type=sc.nextLine();
        int price= sc.nextInt();
        Book fw=new Book(name,author,price,type);
        book.setBook(book.size,fw);
        book.size++;
        System.out.println("添加成功");
    }
}
